package com.matt.repository;

import com.matt.domain.TeachingTemplete;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @Describle This Class Is
 * @Author ZengMin
 * @Date 2018/12/19 15:18
 * @Company Matt
 */
public interface TeachingTempleteRepository extends JpaRepository<TeachingTemplete,String> {

    @Query(value = "select t.* from teaching_templete t left join teaching_templete_area a on t.id = a.templeteId where a.areaId = ?1 ",nativeQuery = true)
    List<TeachingTemplete> findByAreaId(String areaId);

}
